package org.example.strategy;

import org.omg.CORBA.PUBLIC_MEMBER;

public enum Calculator{

    ADD("+"){
        @Override
        public int exec(int a, int b){
            return a+b;
        }

    },

    SUB("-"){
        @Override
        public int exec(int a, int b) {
            return a-b;
        }
    }
    ;

    private String value;

    public String getValue() {
        return value;
    }

    Calculator(String value) {
        this.value = value;
    }

    public abstract int exec(int a,int b);
}
